<template>
  <div>
    这里{{userid}}<br>
    账号：<input type="text" v-model="form.username" /><br />
    密码：<input type="text" v-model="form.password" /><br />
    <button @click="denglu">登录</button>
  </div>
</template>

<script>
import axios from "axios";
export default {
  name: "xiaologin",
  data() {
    return {
      form: {},
      id: 1,
userid:this.$route.query.userid
    };
  },
  methods: {
    denglu() {
      axios({
        url: " http://127.0.0.1:5000/denglu",
        method: "post",
        data: this.form,
      }).then((res) => {
       if(res.data.code==200){
        this.$router.push({ path: "/xiaogongneng" })
        localStorage.setItem('userid',res.data.id);}
      });
    },
  },
  mounted() {},
};
</script>

<style scoped></style>
